﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
/// <summary>
/// js 的摘要说明
/// </summary>
public class js
{
	public js()
	{
		//
		// TODO: 在此处添加构造函数逻辑
		//
	}
    public static string JsHistoryBack(string PubTemp)
    {
        return "<script language=javascript>alert('" + PubTemp + "');history.back();</script>";
    }


    public static string JsClose(string PubTemp)
    {
        return "<script language=javascript>alert('" + PubTemp + "'); window.opener=null;window.close();</script>";
    }

    public static string MetaGoToUrl(string PubContent, string PubUrl, int pubSecond)
    {

        return "<META HTTP-EQUIV=\"REFRESH\" CONTENT=\"" + pubSecond + ";url=" + PubUrl + "\">" + PubContent;
    }

    public static string jsGoToUrl(string PubContent, string PubUrl, int pubSecond) //与meta 的区别就在于 它是用了一个alert 的弹出窗口来反回信息
    {
        return "<script language=\"JavaScript\">\ralert('" + PubContent + "');\rfunction redirect() \r{\r window.location.replace('" + PubUrl + "'); \r}\r setTimeout('redirect();', " + (pubSecond * 1000) + ");\r</script>";
    }
}
